# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.18.1)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../../../../libs/${ANDROID_ABI})

ADD_SUBDIRECTORY(libipcp)

# 导入头文件
include_directories(./include
        libipcp/ipcp/include/ipcp
        libipcp/
        ../../${TARGET_PROJECT}/cpp/include
        ../../../../../../default/transfer/libapvp
        ../../../../../../default/transfer/libapvp/include
        ../../../../../../default/transfer/libapcp
        ../../../../../../default/transfer/libapcp/include)


# 生成Jni侧使用的so库
add_library(vhalmock-jni SHARED
        ../../${TARGET_PROJECT}/cpp/ipcp_auto.cpp
        com_ecarx_vhaltests_IpcpClient.cpp)

find_library(log-lib log)
#find_path(ipcp ../../../../libs/${platform})

target_link_libraries(vhalmock-jni ipcp android ${log-lib})

ADD_SUBDIRECTORY(mockserver_build)